package com.lagou.config;

import com.lagou.utils.ParameterMapping;

import java.util.ArrayList;
import java.util.List;


/**
 * @Author zk
 * @Description JDBC 预处理SQL及参数名封装对象
 * @Date 16:32 2020/6/15
 **/
public class BoundSql {

    /**
     * 带占位符 ? 的 SQL
     */
    private String sql;

    /**
     * 参数名列表
     */
    private List<ParameterMapping> parameterMappings = new ArrayList();

    public BoundSql(String sql, List<ParameterMapping> parameterMappings) {
        this.sql = sql;
        this.parameterMappings = parameterMappings;
    }

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public List<ParameterMapping> getParameterMappings() {
        return parameterMappings;
    }

    public void setParameterMappings(List<ParameterMapping> parameterMappings) {
        this.parameterMappings = parameterMappings;
    }
}
